package com.disv.service.resp;

import com.disv.support.config.Constant;
import lombok.Getter;

/**
 * @desc: CommonRespCode
 * @author: Chao Zhang
 * @date: 2022/10/28 17:57
 */
public enum CommonRespCode implements ReturnResp {

    SUCCESS("000000", "success"),
    NOT_FOUND("000001", "not found"),
    BAD_REQUEST("000002", "bad request"),
    INTERNAL_SERVER_ERROR("000003", "internal server error"),
    SERVICE_UNAVAILABLE("000004", "service unavailable"),
    SERVICE_RATE_LIMIT("000005", "service rate limit"),
    SERVICE_DATA_FAIL("000006", "service data fail"),
    IP_NOT_IN_WHITE_LIST("000007", "ip not in white list"),
    INVALID_SIGNATURE("000008", "Invalid Signature"),
    EXPIRE_REQUEST("000009", "Expire Request"),
    LOGIN_ERROR("000010", "login fail"),// 和前端约定登录失败用
    OA_LOGIN_ERROR("000011", "oa login fail"),// oa登录-和前端约定登录失败用
    ;

    @Getter
    private final String code;

    @Getter
    private final String message;

    CommonRespCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getModule() {
        return Constant.COMMON;
    }

}
